Optimal. Leaf size=56 \[ -\frac{a \sin ^3(c+d x)}{3 d}-\frac{a \sin ^2(c+d x)}{2 d}+\frac{a \sin (c+d x)}{d}+\frac{a \log (\sin (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0552297, antiderivative size = 56, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.12, Rules used = {2836, 12, 75} \[ -\frac{a \sin ^3(c+d x)}{3 d}-\frac{a \sin ^2(c+d x)}{2 d}+\frac{a \sin (c+d x)}{d}+\frac{a \log (\sin (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2836
Rule 12
Rule 75
Rubi steps
\begin{align*} \int \cos ^2(c+d x) \cot (c+d x) (a+a \sin (c+d x)) \, dx &=\frac{\operatorname{Subst}\left (\int \frac{a (a-x) (a+x)^2}{x} \, dx,x,a \sin (c+d x)\right )}{a^3 d}\\ &=\frac{\operatorname{Subst}\left (\int \frac{(a-x) (a+x)^2}{x} \, dx,x,a \sin (c+d x)\right )}{a^2 d}\\ &=\frac{\operatorname{Subst}\left (\int \left (a^2+\frac{a^3}{x}-a x-x^2\right ) \, dx,x,a \sin (c+d x)\right )}{a^2 d}\\ &=\frac{a \log (\sin (c+d x))}{d}+\frac{a \sin (c+d x)}{d}-\frac{a \sin ^2(c+d x)}{2 d}-\frac{a \sin ^3(c+d x)}{3 d}\\ \end{align*}
Mathematica [A] time = 0.0290646, size = 56, normalized size = 1. \[ -\frac{a \sin ^3(c+d x)}{3 d}-\frac{a \sin ^2(c+d x)}{2 d}+\frac{a \sin (c+d x)}{d}+\frac{a \log (\sin (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.051, size = 60, normalized size = 1.1 \begin{align*}{\frac{ \left ( \cos \left ( dx+c \right ) \right ) ^{2}\sin \left ( dx+c \right ) a}{3\,d}}+{\frac{2\,a\sin \left ( dx+c \right ) }{3\,d}}+{\frac{a \left ( \cos \left ( dx+c \right ) \right ) ^{2}}{2\,d}}+{\frac{a\ln \left ( \sin \left ( dx+c \right ) \right ) }{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.01705, size = 63, normalized size = 1.12 \begin{align*} -\frac{2 \, a \sin \left (d x + c\right )^{3} + 3 \, a \sin \left (d x + c\right )^{2} - 6 \, a \log \left (\sin \left (d x + c\right )\right ) - 6 \, a \sin \left (d x + c\right )}{6 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.92589, size = 132, normalized size = 2.36 \begin{align*} \frac{3 \, a \cos \left (d x + c\right )^{2} + 6 \, a \log \left (\frac{1}{2} \, \sin \left (d x + c\right )\right ) + 2 \,{\left (a \cos \left (d x + c\right )^{2} + 2 \, a\right )} \sin \left (d x + c\right )}{6 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.27741, size = 65, normalized size = 1.16 \begin{align*} -\frac{2 \, a \sin \left (d x + c\right )^{3} + 3 \, a \sin \left (d x + c\right )^{2} - 6 \, a \log \left ({\left | \sin \left (d x + c\right ) \right |}\right ) - 6 \, a \sin \left (d x + c\right )}{6 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]